home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8169 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.unt.edu!news
  2. From: Steve Fogoros <sfogoros@hsc.unt.edu>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Newbie doesn't understand compiler error
  5. Date: Fri, 01 Mar 1996 21:32:38 -0800
  6. Organization: University of North Texas Health Science Center
  7. Message-ID: <3137DD76.4EAE@hsc.unt.edu>
  8. References: <Pine.SUN.3.91.960301153010.11258B-100000@pioneer.uspto.gov> <31378ECB.3B81@oc.com>
  9. NNTP-Posting-Host: sfogoros.hsc.unt.edu
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Larry Weiss wrote:
  16. > Max Schubert wrote:
  17. >  >
  18. >  > ...
  19. >  >
  20. >  > main( int argv, char *argc[] )  <<- Compiler states "Syntax error at or near
  21. >  > {                                   word type char."
  22. >  >
  23. >  > Do I need to update my compiler?
  24. >  >
  25. >  >         ANY help would be greatly appreciated.
  26. > First off, you may have made a typo here, but the correct declaration of main() is
  27. >   main( int argc, char *argv[] )                 ^           ^
  28. I agree that Max's illustration is probably a typo, and it is important to catch
  29. the error above as it would lead to extra debug time, but the identifiers can be any legal 
  30. text. I wrote main( int c, char *v[]) once. Works fine, only it doesn't look like K&R.
  31. (I stopped doing it because it looks unnatural. Kind'a gave me the creeps.)
  32.  
  33. -- 
  34. Steve Fogoros, Academic Information Coordinator
  35. University of North Texas Health Science Center
  36. sfogoros@hsc.unt.edu
  37.